home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / tydhtml / dyn.exe / Chap06 / dyn6_2.txt < prev    next >
Encoding:
Text File  |  1997-10-02  |  607 b   |  28 lines

  1. <HTML>
  2.  
  3. HEAD>
  4.  
  5. <TITLE>mouseover and mouseout</TITLE>
  6.  
  7. </HEAD>
  8.  
  9. <STYLE type="text/css">
  10.  
  11. <!--
  12.  
  13. H1 {color:green}
  14.  
  15. -->
  16.  
  17. </STYLE>
  18.  
  19. <SCRIPT  language ="javascript">
  20.  
  21. <!--
  22.  
  23. function changeColor() {
  24.  
  25.    head_0.style.color = "blue";
  26.  
  27.    head_0.style.fontStyle = "italic";
  28.  
  29. }
  30.  
  31. function changeColorBack() {
  32.  
  33.   head_0.style.color = "green";
  34.  
  35.   head_0.style.fontStyle = "normal";
  36.  
  37. }
  38.  
  39. //-->
  40.  
  41. </SCRIPT>
  42.  
  43. <BODY>
  44.  
  45. <H1 id="head_0" onMouseover="changeColor()" nMouseout="changeColorBack()">
  46.  
  47. This is green, except when the mouse points at it</H1>
  48.  
  49. <P>This is some body text.</P>
  50.  
  51. </BODY>
  52.  
  53. </HTML>
  54.  
  55.